package com.swas.dao;

import com.swas.entity.PatrolPoint;
import com.swas.entity.PatrolPointExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface PatrolPointMapper {
    long countByExample(PatrolPointExample example);

    int deleteByExample(PatrolPointExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(PatrolPoint record);

    int insertSelective(PatrolPoint record);

    List<PatrolPoint> selectByExample(PatrolPointExample example);

    PatrolPoint selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") PatrolPoint record, @Param("example") PatrolPointExample example);

    int updateByExample(@Param("record") PatrolPoint record, @Param("example") PatrolPointExample example);

    int updateByPrimaryKeySelective(PatrolPoint record);

    int updateByPrimaryKey(PatrolPoint record);

    @Select("select * from patrol_point where id in (select pointId from task_point where taskId = #{taskId})")
    List<PatrolPoint> selectByTaskId(Integer taskId);

    @Select("select * from patrol_point where id in (select pointId from plan_point where planId = #{planId})")
    List<PatrolPoint> selectByPlanId(Integer planId);
}